package com.bub.pay.framework.common.template;

import java.util.HashMap;
import java.util.Map;

public class JPushVo {

	private String registrationId;
	/**
	 * 设备id
	 */
	private String title;
	/**
	 * 推送内容
	 */
	private String content;
	/**
	 * 详情内容
	 */
	private Map<String,String> messageData;

	private boolean isProd = true;

	public JPushVo() {
	}

	public JPushVo(final String title, final String content) {
		this.content = content;
		this.title = title;
	}

	public String getRegistrationId() {
		return registrationId;
	}

	public void setRegistrationId(String registrationId) {
		this.registrationId = registrationId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		if (messageData == null){
			messageData = new HashMap<>();
		}
		messageData.put("title",title);
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		if (messageData == null){
			messageData = new HashMap<>();
		}
		messageData.put("content",content);
		this.content = content;
	}

	public Map<String, String> getMessageData() {
		return messageData;
	}

	public void setMessageData(Map<String, String> messageData) {
		this.messageData = messageData;
	}

	public boolean isProd() {
		return isProd;
	}

	public void setProd(boolean prod) {
		isProd = prod;
	}

	public void putMessageData(String key,String value){
		if (messageData == null){
			messageData = new HashMap<>();
		}
		messageData.put(key,value);
	}
}
